package cn.skyquant.quant4j.jforex.strategy.yasha;

import cn.skyquant.quant4j.api.enums.BorkerType;
import cn.skyquant.quant4j.api.forex.ForexServiceProxy;
import cn.skyquant.quant4j.jforex.sdk.strategy2.InstrumentConfig;
import cn.skyquant.quant4j.jforex.sdk.strategy2.MultiConfigStrategy;
import cn.skyquant.quant4j.sdk.util.time.CalendarUtils;
import com.dukascopy.api.*;

/**
 * 夜叉
 * 动态点位逆市加仓策略
 *
 * @author harley-dog
 */
@Library("quant4j-api.jar;quant4j-sdk.jar;quant4j-jforex-sdk.jar;freemarker-2.3.28.jar;httpclient-4.5.6.jar;httpcore-4.4.10.jar;fastjson-1.2.49.jar;commons-codec-1.11.jar")
public class Yasha100 extends MultiConfigStrategy  {

    ForexServiceProxy forexServiceProxy;

    @Override
    protected void init(InitEntity initEntity) {
        forexServiceProxy = new ForexServiceProxy(account.getAccountId(), BorkerType.DUKASCOPY);
    }

    @Override
    public void onStopEx(){
        forexServiceProxy = null;
    }

    @Override
    protected void process(InstrumentConfig x, IBar bar) throws JFException {
        out("process:%s", CalendarUtils.formatGMTSimple(context.getTime()));
    }

    @Override
    protected void dailyOpen(Instrument instrument, long time) throws JFException {

    }

    @Override
    protected String getVersion() {
        return "010";
    }

    @Override
    protected String getName() {
        return "Yasha";
    }

    @Override
    protected void onTickEx(Instrument instrument, ITick tick) {

    }

    @Override
    protected void onBarEx(Instrument instrument, Period period, IBar askBar, IBar bidBar) {

    }

    @Override
    protected void onMessageEx(IMessage message) {

    }

    @Override
    protected void onAccountEx(IAccount account) {

    }
}
